<template>
	<view class="container">
		<view class="setting_box">
			<u-cell-group>
				<u-cell title="隐私政策" :isLink="true" arrow-direction="right" />
				<u-cell title="用户协议" :isLink="true" arrow-direction="right" />
			</u-cell-group>
		</view>

		<button class="logout-btn" @tap="handleLogout">退出登录</button>
	</view>
</template>

<script>
	import {
		mapActions
	} from 'vuex'
	export default {
		methods: {
			...mapActions(['userLogoutAction']),
			handleLogout() {
				// TODO: 处理退出登录逻辑
				this.userLogoutAction()
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.setting_box {
		background-color: #fff;
	}

	.logout-btn {
		position: fixed;
		left: 40upx;
		right: 40upx;
		bottom: 40upx;
		color: #ffffff;
		border-radius: 50upx;
		background-color: #20aaff;
	}
</style>